Function Reference

_IEQuit

Close the browser and remove the object reference to it.

#include <IE.au3>
_IEQuit ( ByRef $o_object )

 

Parameters

$o_object Object variable of an InternetExplorer.Application

 

Return Value

Success: Returns 1
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type
@Extended: Contains invalid parameter number

 

Remarks

_IEQuit is particularly important when creating or working with invisible instances of Internet Explorer. When AutoIt exits when working with visible instances of a browser, the browser continues to run and the visible window is left for the user to manage. When the browser instance is invisible however, when AutoIt exits the browser process is left running and there is no user interface to interact with and an orphan Iexplore.exe process is left running on the system. It is therefore good practice to call _IEQuit whenever the browser process is not needed after the script exists.

_IEQuit is not allowed with embedded browser objects created with _IECreateEmbedded. The browser processes associated with those objects will close when their parent GUI window is destroyed.

 

Related

_IEAttach, _IECreate

 

Example


; *******************************************************
; Example 1 - Create an invisible browser window, navigate to a
;               website, retrieve some information and Quit
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("http://sourceforge.net", 0, 0)
; Display the innerText on an element on the page with a name of "sfmarquee"
$oMarquee = _IEGetObjByName ($oIE, "sfmarquee")
MsgBox(0, "SourceForge Information", $oMarquee.innerText)
_IEQuit ($oIE)